import request from '@/utils/request'
// 定义公共的api
const BASE_URL = '/lovePet/system/sysUser';
export function login(data) {
  return request({
    url: '/lovePet/system/index/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/lovePet/system/index/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/lovePet/system/index/logout',
    method: 'post'
  })
}

export default{
  // 查询用户和分页
  getUserPageInfo(page,limit,searchObj){
    return request({
      url:`${BASE_URL}/${page}/${limit}`,
      method: 'get',
      params:searchObj
    })
  },

}

